from model.user import UserDao
import time

def create_super_admin():
    """ Return _id of the super admin if success, otherwise None
    """
    user_dao = UserDao()
    user = user_dao.find_one({'username':'setup'})
    if user is None:
        return user_dao.save({'username':'setup', 
                       'password':'admin',
                       'email':'setup@specxp.com',
                       'phone': '123-456-789', 
                       'role':2,
                       'title':0,
                       'created':time.time()})
    else:
        return None
        